<?
// $file: control/inc/functions/time/mydate.php
/************************************************************/
/*                     WDLab CMS                            */
/*              < http://www.wdlab.ru >                     */
/************************************************************/
// Original Author	 : Morozov Valentin, WDLab Group 
// Author Website 	 : http://www.wdlab.ru/
// Author Email 	 : info@wdlab.ru
// License Type   	 : GPL: See /control/manual/GPL.txt; 
// License in russian: See /control/manual/GPL_ru.txt; 
// ------------------------------------------------------------------------- //


function mydate ($date = "", $param = "")
{
		
	//дата в формате 28 июн€ 2006
	if ($param==1)  {
		
		$Day=date("j", $date);
		//if ($Day<10) $Day=str_replace("0", "", $Day);
		
		$return=$Day." ".getmounth($date)." ".date("Y", $date)." г.";
		return $return;
	}
	
	//дата в формате 28 июн€
	if ($param==2)  {
		
		$Day=date("j", $date);
		//if ($Day<10) $Day=str_replace("0", "", $Day);
		
		$return=$Day." ".getmounth($date);
		return $return;
	}
	
	//дата в формате —ред€, 28 июн€ 14:15
	if ($param==3)  {
		
		$Day=date("j", $date);
		//if ($Day<10) $Day=str_replace("0", "", $Day);
		
		$return="<strong>".getday($date)."</strong> ".$Day." ".getmounth($date)." <strong>".date("H:i", $date)."</strong>";
		return $return;
	}
	
	//дата в формате 05.07.2006
	if ($param==4)  {
		
		$Day=date("j", $date);
		//if ($Day<10) $Day=str_replace("0", "", $Day);
		
		$Mounth=date("m", $date);
		if ($Mounth<10) $Mounth=str_replace("0", "", $Mounth);
		
		$Year=date("Y", $date);
		
		$return=$Day.".".$Mounth.".".$Year;
		return $return;
	}
	
	//дата в формате —реда, 28 июн€ 14:15
	if ($param==6)  {
		
		$Day=date("j", $date);
		//if ($Day<10) $Day=str_replace("0", "", $Day);
		
		$return=" ".getday($date)." ".$Day." ".getmounth($date)." ".date("H:i", $date)."";
		return $return;
	}
	
	//дата в формате —ред€, 28 июн€
	if ($param==7)  {
		
		$Day=date("j", $date);
		//if ($Day<10) $Day=str_replace("0", "", $Day);
		
		$return="<strong>".getday($date)."</strong> ".$Day." ".getmounth($date)." ".date("Y", $date)." г.";
		return $return;
	}
	
	//английска€ дата в формате 28 of July, 2006
	if ($param==5)  {
		
		$Day=date("j", $date);
		//if ($Day<10) $Day=str_replace("0", "", $Day);
		
		$return=$Day."<sup>".date("S", $date)."</sup> of ".en_getmounth($date).", ".date("Y", $date);
		return $return;
	}
	
//дата в формате —ред€, 28 июн€ 14:15
	if ($param==8)  {
		
		$Day=date("j", $date);
		//if ($Day<10) $Day=str_replace("0", "", $Day);
		
		$return="<strong>".getday($date)."</strong><br/> ".$Day." ".getmounth($date)." <strong>".date("H:i", $date)."</strong>";		return $return;
	}
	
//дата в формате —ред€, 28 июн€ 14:15
	if ($param==9)  {
		
		$Day=date("j", $date);
		//if ($Day<10) $Day=str_replace("0", "", $Day);
		$year=date("Y", $date);
		$return=" <strong>".date("H:i", $date)."</strong> ".$Day." ".getshmounth($date)." ".$year;

		return $return;
	}
	
//дата в формате —ред€, 28 июн€ 14:15
	if ($param==10)  {
		
		$Day=date("j", $date);
		//if ($Day<10) $Day=str_replace("0", "", $Day);
		$year=date("Y", $date);
		$return=" <strong>".date("H:i", $date)."</strong>".$Day."<sup>".date("S", $date)."</sup> of ".en_getmounth($date)." ".$year;
		return $return;
	}
	
	
	
	
	
}
?>